<!DOCTYPE html>
<input type="search" id="s1"><br>
<input type="search" id="s2" results="-10"><br>
<input type="search" id="s3" results="0"><br>
<input type="search" id="s4" results="10"><br>

<input type="search" id="s5"><br>
<input type="search" id="s6" results="-1"><br>
<input type="search" id="s7" results="1"><br>
<script>
    document.body.offsetTop;
    s5.setAttribute("results", "1");
    s6.setAttribute("results", "1");
    s7.setAttribute("results", "-1");
</script>
